npm填坑笔记 发表于 2019-05-24 | 分类于 包管理器 | 字数统计: 178 字 | 阅读时长 ≈ 1 分钟 1.node版本不对 问题描述 npm i时,发现报错primordials is not defined. 原因 node 12版本太高,须降到稳定版10 解决 卸载node,安装nvm brew install nvm mkdir ~/.nvm; open ~/.zshrc 复制export NVM_DIR=”$HOME/.nvm” . “/usr/local/opt/nvm/nvm.sh” 到文件中, source ~/.zshrc nvm install 10.15.3 达到降版本的作用,以及npm也回来啦~2.安装Node、Mysql报错 123456问题1Error:Directory not empty @ dir_s_rmdir - /usr/local/opt/openssl解决sudo rm -rf /usr/local/opt/opensslbrew install openssl 123456问题2dyld:Library not loaded:/usr/local/opt/openssl/lib/libssl.1.0.0.dylib解决brew remove opensslbrew install openssl 12345678问题3If you need to have mysql@5.1 first in your PATH num:echo "export PATH='/USR/LOCAL/OPT...'" >> ~/.zshrc解决open ~/.zshrc复制路径到最后source ~/.zshrc